package com.gonsin.gview.logic.utils;

import org.apache.commons.beanutils.Converter;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class MySetConverter implements Converter {

    @Override
    public <T> T convert(Class<T> type, Object value) {
        if(value == null){
            return null;
        }
        if(value instanceof Set){
            return (T) value;
        }
        if(value == null){
            return null;
        }
        return (T) new HashSet<>();
    }
}
